import java.util.Arrays;

public class VarargsDemo{
    public static void main(String[] args) {


//        System.out.println(largest(12,-12,45,4,345,23,49));
//        System.out.println(largest(-43,-12,-705,-48,-3));
//    }
//    private static int largest(int...numbers) {
//        int currentLargest = numbers[0];
//        for (int number : numbers) {
//            if (number > currentLargest) {
//                currentLargest = number;
//            }
//        }
//        return currentLargest;


        int [][] array = new int[5][6];
        int [] x = {1, 2};
        array[0] = x;
        System.out.println("array[0][1] is " + array[0][1]);


//        int[] source = {1,2,3,4,5};
//        int[] targe = new int[5];
//        for (int i = 0; i < source.length; i++){
//            targe[i] = source[i];
//        }
//        System.out.println("(1)"+Arrays.toString(targe));
//        System.arraycopy(source,0,targe,0,source.length);
//        System.out.println("(2)"+Arrays.toString(targe));
//        int[] target3 = Arrays.copyOf(source, source.length);
//        System.out.println("(3)"+Arrays.toString(target3));


    }
}